package com.ghck.server.model;

import java.util.Date;
/**
 * 积分历史  <br>
 * t_credits_history <br>
 * v1.0 2016-05-01
 */
 public class CreditsHistory extends BaseModel implements Comparable<CreditsHistory>{
	
	private static final long serialVersionUID = 1L;
	
 	
 	//id
	private Integer id;

 	//用户ID t_users 表ID
 	//user_id
	private Integer userId;

 	//积分分类,dict_credits_category 表ID
 	//category_id
	private Integer categoryId;

 	//积分数
 	//num
	private Integer num;
	
	private Integer sourceId;

 	//备注
 	//remark
	private String remark;

 	//是否在用,0：未使用,1：正在使用
 	//in_used
	private Integer inUsed;

 	
 	//last_modify_time
	private Date lastModifyTime;

 	
 	//create_time
	private Date createTime;

	
	/**
	*
 	*id
 	*/
	public Integer getId() {
		return id;
	}
	
	/**
	*
 	*id
 	*/
	public void setId(Integer id) {
		this.id = id;
	}
	
	/**
	*用户ID t_users 表ID
 	*user_id
 	*/
	public Integer getUserId() {
		return userId;
	}
	
	/**
	*用户ID t_users 表ID
 	*user_id
 	*/
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	
	/**
	*积分分类,dict_credits_category 表ID
 	*category_id
 	*/
	public Integer getCategoryId() {
		return categoryId;
	}
	
	/**
	*积分分类,dict_credits_category 表ID
 	*category_id
 	*/
	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}
	
	/**
	*积分数
 	*num
 	*/
	public Integer getNum() {
		return num;
	}
	
	/**
	*积分数
 	*num
 	*/
	public void setNum(Integer num) {
		this.num = num;
	}
	
	/**
	*备注
 	*remark
 	*/
	public String getRemark() {
		return remark;
	}
	
	/**
	*备注
 	*remark
 	*/
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	/**
	*是否在用,0：未使用,1：正在使用
 	*in_used
 	*/
	public Integer getInUsed() {
		return inUsed;
	}
	
	/**
	*是否在用,0：未使用,1：正在使用
 	*in_used
 	*/
	public void setInUsed(Integer inUsed) {
		this.inUsed = inUsed;
	}
	
	/**
	*
 	*last_modify_time
 	*/
	public Date getLastModifyTime() {
		return lastModifyTime;
	}
	
	/**
	*
 	*last_modify_time
 	*/
	public void setLastModifyTime(Date lastModifyTime) {
		this.lastModifyTime = lastModifyTime;
	}
	
	/**
	*
 	*create_time
 	*/
	public Date getCreateTime() {
		return createTime;
	}
	
	/**
	*
 	*create_time
 	*/
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public Integer getSourceId() {
		return sourceId;
	}

	public void setSourceId(Integer sourceId) {
		this.sourceId = sourceId;
	}

	@Override
	public int compareTo(CreditsHistory o) {
		if(o!=null && o.id!=null){
			return o.id.compareTo(id);
		}
		return 0;
	}
	
	@Override
	public void dealWith(){
		super.dealWith();
		
	}
}	